﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

using System.Text;

namespace DotNETX.Authentication.Db.SqlServer
{
    public static class ConnectionUtils
    {
        public static IDbConnection CreateSqlConnection(string datasource, string database, string uid, string pwd)
        {
            return new SqlConnection(string.Format("Data Source={0};Initial Catalog={1};User ID={2};Password={3}", datasource, database, uid, pwd));
        }

        public static IDbConnection CreateSqlConnection(string connectionString)
        {
            return new SqlConnection(connectionString);
        }
    }
}
